package com.doge.controller.wx;

import com.doge.bean.base.BaseRespVo;
import com.doge.bean.bo.collect.WxCollectBo;
import com.doge.bean.vo.collect.CollectListVo;
import com.doge.service.wx.collect.WxCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: doge
 * @description: 收藏商品
 * @author: Mr.Jiang
 * @create: 2021-12-02 20:31
 **/
@RestController
@RequestMapping("wx/collect")
public class WxCollectController {
    @Autowired
    WxCollectService wxCollectService;
    @RequestMapping("addordelete")
    public BaseRespVo addordelete(@RequestBody WxCollectBo wxCollectBo){
        wxCollectService.addordelete(wxCollectBo.getValueId(),wxCollectBo.getType());
        return BaseRespVo.ok();
    }
    @RequestMapping("list")
    public BaseRespVo list(Integer type,Integer page,Integer limit){
        CollectListVo collectListVo=wxCollectService.list(type,page,limit);
        return BaseRespVo.ok(collectListVo);
    }

}
